import { indicatordepartMap } from '@/config/dict'

export const queryFormItem = [
  {
    type: 'select',
    key: 'depart',
    label: '考核部门',
    options: indicatordepartMap
  }
]
export const tableColumn = (page, size) => {
  return [
    {
      key: 'part',
      label: '组织名称',
      minWidth: 140
    },
    {
      key: 'theme',
      label: '收缴率(考核)',
      minWidth: 140
    },
    {
      key: 'data',
      label: '催缴率(考核)',
      minWidth: 120
    },
    {
      key: 'indicatorname',
      label: '业主满意度(关联)',
      minWidth: 120
    },
    {
      key: 'check',
      label: '工单响应率(关联)',
      minWidth: 120
    }
  ]
}

export const updateFormItem = disabled => {
  return [
    {
      type: 'select',
      key: 'indicatorname',
      label: '指标名称',
      col: 24,
      slotAttrs: {
        style: {
          width: '40%'
        }
      }
    },
    {
      type: 'select',
      key: 'depart',
      label: '考核部门',
      col: 24,
      slotAttrs: {
        style: {
          width: '40%'
        }
      }
    },
    {
      type: 'select',
      key: 'theme',
      label: '考核主题',
      col: 24,
      slotAttrs: {
        style: {
          width: '40%'
        }
      }
    },
    {
      type: 'select',
      key: 'data',
      label: '数据系统',
      col: 24,
      slotAttrs: {
        style: {
          width: '40%'
        }
      }
    },
    {
      type: 'select',
      key: 'name',
      label: '责任人',
      col: 24,
      slotAttrs: {
        style: {
          width: '100%'
        }
      }
    },
    {
      type: 'select',
      key: 'type',
      label: '接口类型',
      col: 24,
      slotAttrs: {
        style: {
          width: '40%'
        }
      }
    },
    {
      type: 'select',
      key: 'address',
      label: '接口地址',
      col: 24,
      slotAttrs: {
        style: {
          width: '100%'
        }
      }
    },
    {
      type: 'textarea',
      key: 'describe',
      label: '指标描述',
      col: 24,
      slotAttrs: {
        style: {
          width: '100%',
          height: '300%'
        }
      }
    },
    {
      type: 'select',
      key: 'table',
      label: '默认图表',
      col: 24
    }
  ]
}
